package com.xie.mapper;

import com.xie.pojo.BaiduWap;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BaiduWapMapper extends Mapper<BaiduWap> {

    @Select("select name,count from zy ORDER BY count desc LIMIT 10;")
    public List<BaiduWap> findByDesc();

    @Select("select * from zy where id in (select zid from user_wap where uid = #{uid})")
    List<BaiduWap> findByUser(int uid);

    @Select("select count(1) from user_wap where uid=#{uid}")
    int countByUser(int uid);
}
